package com.lhn.bbs.mapper;

import com.lhn.bbs.dto.UserVo;
import com.lhn.bbs.entity.User;
import com.lhn.bbs.entity.UserExample;
import java.util.List;

import com.lhn.bbs.vo.EditUser;
import org.apache.ibatis.annotations.Param;

public interface UserDao {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userid);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userid);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> findAll();

    long addUser(UserVo user);

    User findBySno(String sno);

    List<User> selectUserall(int status);

    long deleteBysno(String sno);

    long updateUserBysno(EditUser editUser);


//   修改密码
    long editpasswordBySno(@Param(value = "sno") String sno,@Param(value = "password") String password);

    long editUserByid(@Param(value = "sno") String sno, @Param(value = "username")String username,
                      @Param(value = "sex")String sex, @Param(value = "email")String email,
                      @Param(value = "sdept")String sdept,@Param(value = "sign") String sign);

    void editnum(@Param(value = "themenum") int themenum, @Param(value = "replynum") int replynum,@Param(value = "userid") int userid);

    void editthemenum(@Param(value = "number") int number,@Param(value = "userid")  Integer userid);

    void editreplynum(@Param(value = "replynumber") Integer replynumber, @Param(value = "userid")Integer userid);
}